<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Registra Amministratore</title>
</head>
<body>

	<script type="text/javascript">
		function checkInput(nome, cognome, nomeutente, password, email, abilita) {

			var dati = '/swimv2Client/RegistraAmministratoreServlet?nome=';
			if (nome.value.length == 0) {
				alert("Nome non inserito");
				elem.focus();
			} else if (cognome.value.length == 0) {
				alert("cognome non inserito");
				elem.focus();
			} else if (nomeutente.value.length == 0) {
				alert("Nome utente non inserito");
				elem.focus();
			} else if (password.value.length == 0) {
				alert("Password non inserita");
				elem.focus();
			} else if (email.value.length == 0) {
				alert("E-Mail non inserita");
				elem.focus();}
				else {

					dati = dati + nome.value;
					dati = dati + '&cognome=';
					dati = dati + cognome.value;
					dati = dati + '&nomeutente=';
					dati = dati + nomeutente.value;
					dati = dati + '&password=';
					dati = dati + password.value;
					dati = dati + '&email=';
					dati = dati + email.value;

					window.location = dati;
				}

			}
		</script>
	<form name="Registrazioneamm" action="/swimv2Client/RegistraAmministratoreServlet"
		method="get">

		<table border="0" cellpadding="1" cellspacing="2" width="100%">

			<TBODY>

				<tr>
					<td align="left" width="0%">Nome:</td>
					<td align="left" width="50%"><INPUT id="nome" name="nome"
						value=""></td>
				</tr>
				<tr>
					<td align="left" width="0%">Cognome:</td>
					<td align="left" width="50%"><INPUT id="cognome"
						name="cognome" value=""></td>
				</tr>
				<tr>
					<td align="left" width="0%">Nome Utente:</td>
					<td align="left" width="50%"><INPUT id="nomeutente"
						name="nomeutente" value=""></td>
				</tr>
				<tr>

					<td align="left" width="0%">Password:</td>
					<td align="left" width="0%"><INPUT id="password"
						name="password" type="password" value=""></td>
				</tr>
				<tr>
					<td align="left" width="0%">E-Mail:</td>
					<td align="left" width="50%"><INPUT id="email" name="email"
						value=""></td>
				</tr>
				<tr>
					<td align="left" width="0%"></td>
					<td align="left" width="0%"><input type="button"
						value="Registrati"
						onClick="checkInput(document.getElementById('nome'),document.getElementById('cognome'),
								document.getElementById('nomeutente'),document.getElementById('password'),
								document.getElementById('email'))"></td>
				</tr>
				</TBODY>
				</table>
				</form>
</body>
</html>